package org.mycub.server.dataprovider;

import java.util.List;

import org.mycub.server.data.models.PaidParking;
import org.mycub.server.mongodb.MongoDB;

public class PaidParkingsProvider {

	/**
	 * @param args
	 */
	
	private List<PaidParking> parkings;

	public List<PaidParking> getParkings(double longitude, double latitude, double rayon){
		
		List<PaidParking> paidParkings = MongoDB.dataStore.find(PaidParking.class).
				field("location").within(longitude,latitude,rayon).asList();
		
		return paidParkings;
	}

	public List<PaidParking> getParkings() {
		return parkings;
	}

	public void setParkings(List<PaidParking> parkings) {
		this.parkings = parkings;
	}

}
